﻿@model Physis.Client.Models.Entity.EntityModel

@{ Layout = null; }

<!DOCTYPE html>

<html>

<head>

    <meta name="viewport" content="width=device-width" />

    <title>@Model.PageTitle</title>
    

    <!-- Application Styles -->
    
    <link rel="stylesheet" href="~/Assets/Css/Application/Application.css" type="text/css" />

    <link rel="stylesheet" href="~/Assets/Css/Application/NoPrint.css" media="print" type="text/css" />

    <link rel="stylesheet" id="ThemeStylesheet" href="~/Assets/Css/Themes/Redmond/jquery-ui-1.10.2.min.css" type="text/css" /> <!-- JQUERY UI --> 

    @RenderSection("InlineStyles", false)
    

    <!-- jQuery and Support Libraries -->

    <script src="~/Scripts/Library/jquery-1.9.1.min.js" type="text/javascript"></script>

    <script src="~/Scripts/Library/sugar-1.3.9.min.js" type="text/javascript"></script>


    <!-- jQuery UI -->

    <script src="~/Scripts/Library/jquery-ui-1.10.2.min.js" type="text/javascript"></script>


    <!-- jqGrid -->

    <link rel="stylesheet" href="~/Assets/Css/Library/ui.jqgrid.css" type="text/css" />

    <script src="~/Scripts/Library/jquery.jqGrid.min.js" type="text/javascript"></script>

    <script src="~/Scripts/Library/grid.locale-en.js" type="text/javascript"></script>


    <!-- Application Script -->

    <script src="~/Scripts/Application/Entity/EntityAddWizardMaster.js" type="text/javascript"></script>

    <script src="~/Scripts/Application/Physis_jqGridSupport.js" type="text/javascript"></script>
    
    <script src="~/Scripts/Application/Physis_ProgressBarSupport.js" type="text/javascript"></script>

    <script src="~/Scripts/Application/Physis_TabControlSupport.js" type="text/javascript"></script>

    <script src="~/Scripts/Application/Physis_ThemeSupport.js" type="text/javascript"></script>

    <!-- Inline CSS -->

    <style type="text/css">

        .PropertyTab { height: 525px; }

    </style>

</head>
    
<body class="TextNormal ui-widget-content-background">
    
<form id="EntityForm" method="post">

    <input id="RootUrl" type="hidden" value="@Url.Content("~")" />
    
    <div id="ApplicationTitleBar" class="ui-state-default">

        <table style="width: 100%;">
            
            <tr class="" style="height: 32px;">

                <td style="padding-left: .125in;width: 100%;"><b>@Physis.Data.Functions.PascalString(Model.Entity.GetType().Name): <label id="ConfigurationItemNameLabel">@Model.Entity.Name</label></b></td>

                <td>

                    <select onchange="UpdateTheme($(this).val());">

                        <option value="Blitzer">Blitzer</option>

                        <option value="Cupertino">Cupertino</option>

                        <option value="Darkness">Darkness</option>

                        <option value="Eggplant">Eggplant</option>

                        <option value="Humanity">Humanity</option>

                        <option value="Lightness">Lightness</option>

                        <option value="Overcast">Overcast</option>

                        <option value="Redmond">Redmond</option>

                        <option value="Smoothness">Smoothness</option>

                        <option value="Start">Start</option>

                        <option value="Sunny">Sunny</option>

                    </select>

                </td>
                
            </tr>

        </table>

    </div>

    <div id="theme-rules-expressed" style="display: none;">

        <div id="theme-ui-state-active" class="ui-state-active"></div>

        <div id="theme-ui-state-default" class="ui-state-default"></div>

        <div id="theme-ui-state-hover" class="ui-state-hover"></div>

        <div id="theme-ui-widget-content" class="ui-widget-content"></div>

    </div>

    @Html.HiddenFor(model => model.Entity.Id)

    @Html.HiddenFor(model => model.Entity.EntityType)

    <div id="PropertyTabs" style="font-size: 10pt !important; padding: 0px; border-width: 0px 0px 0px 0px">

        <ul class="TextNormal">

            <li><a href="#PropertyTab_General">General</a></li>

            @RenderSection("ItemPropertyTabs", false)

        </ul>

        <div id="PropertyTab_General" class="PropertyTab TextNormal" style="padding: 8px;">
            
            <div style="margin: 0px 0px 10px 0px; line-height: 150%;">

                <div id="Entity_Person_Selection" style="margin-bottom: 6px; display: @((Model.Entity.CanBePerson) ? "block" : "none")">@Html.CheckBoxFor(model => model.Entity.Person, new { onclick="Entity_Person_OnClick();" })<label for="Entity_Person" style="font-weight: bold;">Is a Person?</label> </div>
                    
                <div id="Entity_Name_Label" style="margin-bottom: 6px;">

                    <div id="Entity_Person_False" style=""><span style="font-weight: bold; display: block;">Name:</span> @Html.TextBoxFor(model => model.Entity.Name, new { style="width: 250px;", onchange="Name_OnChange(this);" })</div>

                    <div id="Entity_Person_True" style="display: none;">

                        <table style="width: auto;">
                            
                            <tr>

                                <td style="font-weight: bold;">Last Name</td>

                                <td style="font-weight: bold;">First Name</td>

                                <td style="font-weight: bold;">Middle Name</td>

                                <td style="font-weight: bold;">Suffix</td>

                            </tr>

                            <tr>

                                <td style="padding-right: 8px;">@Html.TextBoxFor(model => model.Entity.NameLast, new { style="width: 150px;", onchange="Name_OnChange(this);" })</td>

                                <td style="padding-right: 8px;">@Html.TextBoxFor(model => model.Entity.NameFirst, new { style="width: 150px;", onchange="Name_OnChange(this);" })</td>

                                <td style="padding-right: 8px;">@Html.TextBoxFor(model => model.Entity.NameMiddle, new { style="width: 150px;", onchange="Name_OnChange(this);" })</td>

                                <td style="padding-right: 8px;">@Html.TextBoxFor(model => model.Entity.NameSuffix, new { style="width: 100px;", onchange="Name_OnChange(this);" })</td>

                            </tr>
                            
                        </table>
                    
                    </div>

                </div>
                
                <table style="width: auto;">
                            
                    <tr>

                        <td style="font-weight: bold;"><label id="Entity_UniqueId_Label">Unique Id</label></td>

                        <td style="font-weight: bold;"><label id="Entity_FederalTaxId_Label">Federal Tax Id</label></td>

                        @RenderSection("ItemPropertyTabsContent_GeneralProperties_Identifiers_Labels", false)
                        
                        <td style="font-weight: bold;"><label id="Entity_LegacyId_Label">Legacy Id</label></td>

                    </tr>

                    <tr>

                        <td style="padding-right: 8px;">@Html.TextBoxFor(model => model.Entity.UniqueId, new { style="width: 125px;", maxlength="20" })</td>

                        <td style="padding-right: 8px;">@Html.TextBoxFor(model => model.Entity.FederalTaxId, new { style="width: 90px;", maxlength="9" })</td>

                        @RenderSection("ItemPropertyTabsContent_GeneralProperties_Identifiers_Inputs", false)
                        
                        <td style="padding-right: 8px;">@Html.TextBoxFor(model => model.Entity.LegacyId, new { style="width: 125px;", maxlength="20" })</td>

                    </tr>
                            
                </table>
                    
                @RenderSection("ItemPropertyTabsContent_GeneralProperties_Demographics", false)
                                    
            </div>
            
            <div class="ui-state-active" style="padding: 4px;">Properties and Settings</div>

            <div id="ItemPropertyTabsContent_GeneralProperties" class="ui-widget-content" style="height: 195px; margin: 0px 0px 10px 0px; padding: 4px; line-height: 150%; border-top-width: 0px;">

                @RenderSection("ItemPropertyTabsContent_GeneralProperties", false)

            </div>

            <table><tr>

                <td style="width: 50%; padding-right: 8px;">

                    <div class="ui-state-active" style="padding: 4px;">Mailing</div>

                    <div class="ui-widget-content" style="padding: 8px; border-top-width: 0px;">

                        <table>

                            <tr><td colspan="3"><b>Address Line 1</b></td></tr>

                            <tr><td colspan="3"><input id="Entity_MailingAddress_Line1" name="Entity_MailingAddress_Line1" type="text" style="width: 350px" /></td></tr>

                            <tr><td colspan="3"><b>Address Line 2</b></td></tr>

                            <tr><td colspan="3"><input id="Entity_MailingAddress_Line2" name="Entity_MailingAddress_Line2" type="text" style="width: 350px" /></td></tr>

                            <tr><td><b>Zip Code</b></td><td><b>City</b></td><td><b>State</b></td></tr>
                        
                            <tr>
                            
                                <td><input id="Entity_MailingAddress_ZipCode" name="Entity_MailingAddress_Line2" type="text" style="width: 75px" /></td>
                        
                                <td><input id="Entity_MailingAddress_City" name="Entity_MailingAddress_Line2" type="text" style="width: 125px" /></td>
                            
                                <td><input id="Entity_MailingAddress_State" name="Entity_MailingAddress_Line2" type="text" style="width: 30px" /></td>
                        
                            </tr>

                        </table>                   
                        
                    </div>                            

                </td>
                
                <td style="width: 50%; padding-left: 8px;">
                    
                    <div class="ui-state-active" style="padding: 4px;">Physical</div>

                    <div class="ui-widget-content" style="padding: 8px; border-top-width: 0px;">

                        <table>

                            <tr><td colspan="3"><b>Address Line 1</b></td></tr>

                            <tr><td colspan="3"><input id="Entity_PhysicalAddress_Line1" name="Entity_PhysicalAddress_Line1" type="text" style="width: 350px" /></td></tr>

                            <tr><td colspan="3"><b>Address Line 2</b></td></tr>

                            <tr><td colspan="3"><input id="Entity_PhysicalAddress_Line2" name="Entity_PhysicalAddress_Line2" type="text" style="width: 350px" /></td></tr>

                            <tr><td><b>Zip Code</b></td><td><b>City</b></td><td><b>State</b></td></tr>
                        
                            <tr>
                            
                                <td><input id="Entity_PhysicalAddress_ZipCode" name="Entity_PhysicalAddress_Line2" type="text" style="width: 75px" /></td>
                        
                                <td><input id="Entity_PhysicalAddress_City" name="Entity_PhysicalAddress_Line2" type="text" style="width: 125px" /></td>
                            
                                <td><input id="Entity_PhysicalAddress_State" name="Entity_PhysicalAddress_Line2" type="text" style="width: 30px" /></td>
                        
                            </tr>

                        </table>                   
                        
                    </div>                            

                </td>

            </tr></table>

        </div>

        @RenderSection("ItemPropertyTabsContent", false)

    </div>

    <div id="ButtonContainer" class="ui-widget-content" style="margin: 0px; padding: 0px; border-width: 1px 0px 0px 0px;"><div style="padding: 6px;">

        <table style="width: 100%;" border="0"><tr>
    
            <td style="padding-left: .125in; white-space: nowrap; width: 85px; font-weight: bold;">Last Response:</td>

            <td style="padding-left: .125in;"><label id="LastResponseMessageLabel"></label></td>
    
            <td style="width: .125in;">&nbsp;<input id="ButtonClicked" name="ButtonClicked" type="hidden" value="" /></td>

            <td style="padding-right: .125in; width: 45px;">

                <div id="AjaxWorking" style="display: none;">

                    <div>Working</div>
                
                    <div id="AjaxWorking_ProgressBar" style="width: 45px;"></div>                    

                </div>

            </td>

            <td style="width: 80px;"><button id="ButtonOK" type="button" style="width: 75px; height: 24px; font-size: 8pt; padding: 0px;" onclick="OkApply_OnClick (this);" value="OK">OK</button></td>    
    
            <td style="width: .125in;">&nbsp;</td>

            <td style="width: 80px;"><button id="ButtonCancel" type="button" style="width: 75px; height: 24px; font-size: 8pt; padding: 0px;" onclick="Cancel_OnClick (this);" value="Cancel">Cancel</button></td>    
        
            <td style="width: .125in;">&nbsp;</td>

            <td style="width: 80px;"><button id="ButtonApply" type="button" style="width: 75px; height: 24px; font-size: 8pt; padding: 0px;" onclick="OkApply_OnClick (this);" value="Apply">Apply</button></td>    

        </tr></table>

    </div></div>

    <div style="display: none;">@RenderBody()</div>
    

</form>

</body>

</html>
